import request from '@/utils/request'

export function getCustomer(payload) {
  return request({
    url: '/customerInfo',
    method: 'get',
    params: {
      name: payload.name,
      username: payload.username,
      page: payload.page,
      pageSize: payload.pageSize
    }
  })
}

export function getCustomerInfo(name) {
  return request({
    url: '/customerInfo/findOne',
    method: 'get',
    params: {
      username: name
    }
  })
}

export function updateCustomerInfo(payload) {
  return request({
    url: '/customerInfo',
    method: 'put',
    data: payload
  })
}

export function modifyCustomerUserType(payload) {
  return request({
    url: '/customerInfo/userType',
    method: 'put',
    data: payload
  })
}

